Optimal. Leaf size=142 \[ \frac {8 a \left (2 a^2+b^2\right ) \sin (c+d x)}{35 d}-\frac {3 \cos ^5(c+d x) (b-2 a \tan (c+d x)) (a+b \tan (c+d x))^2}{35 d}+\frac {\cos ^6(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{7 d}-\frac {2 \cos ^3(c+d x) \left (b \left (6 a^2+b^2\right )-a \left (4 a^2-b^2\right ) \tan (c+d x)\right )}{35 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3593, 751, 835,
792, 197} \begin {gather*} \frac {8 a \left (2 a^2+b^2\right ) \sin (c+d x)}{35 d}-\frac {2 \cos ^3(c+d x) \left (b \left (6 a^2+b^2\right )-a \left (4 a^2-b^2\right ) \tan (c+d x)\right )}{35 d}-\frac {3 \cos ^5(c+d x) (b-2 a \tan (c+d x)) (a+b \tan (c+d x))^2}{35 d}+\frac {\sin (c+d x) \cos ^6(c+d x) (a+b \tan (c+d x))^3}{7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 197
Rule 751
Rule 792
Rule 835
Rule 3593
Rubi steps
\begin {align*} \int \cos ^7(c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac {\left (\cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {(a+x)^3}{\left (1+\frac {x^2}{b^2}\right )^{9/2}} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\cos ^6(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{7 d}-\frac {\left (\cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {(-6 a-3 x) (a+x)^2}{\left (1+\frac {x^2}{b^2}\right )^{7/2}} \, dx,x,b \tan (c+d x)\right )}{7 b d}\\ &=-\frac {3 \cos ^5(c+d x) (b-2 a \tan (c+d x)) (a+b \tan (c+d x))^2}{35 d}+\frac {\cos ^6(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{7 d}-\frac {\left (b \cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {(a+x) \left (-6 \left (1+\frac {4 a^2}{b^2}\right )-\frac {12 a x}{b^2}\right )}{\left (1+\frac {x^2}{b^2}\right )^{5/2}} \, dx,x,b \tan (c+d x)\right )}{35 d}\\ &=-\frac {3 \cos ^5(c+d x) (b-2 a \tan (c+d x)) (a+b \tan (c+d x))^2}{35 d}+\frac {\cos ^6(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{7 d}-\frac {2 \cos ^3(c+d x) \left (b \left (6 a^2+b^2\right )-a \left (4 a^2-b^2\right ) \tan (c+d x)\right )}{35 d}+\frac {\left (8 a \left (1+\frac {2 a^2}{b^2}\right ) b \cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\left (1+\frac {x^2}{b^2}\right )^{3/2}} \, dx,x,b \tan (c+d x)\right )}{35 d}\\ &=\frac {8 a \left (2 a^2+b^2\right ) \sin (c+d x)}{35 d}-\frac {3 \cos ^5(c+d x) (b-2 a \tan (c+d x)) (a+b \tan (c+d x))^2}{35 d}+\frac {\cos ^6(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{7 d}-\frac {2 \cos ^3(c+d x) \left (b \left (6 a^2+b^2\right )-a \left (4 a^2-b^2\right ) \tan (c+d x)\right )}{35 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.15, size = 204, normalized size = 1.44 \begin {gather*} \frac {-105 b \left (5 a^2+b^2\right ) \cos (c+d x)-35 \left (9 a^2 b+b^3\right ) \cos (3 (c+d x))-105 a^2 b \cos (5 (c+d x))+7 b^3 \cos (5 (c+d x))-15 a^2 b \cos (7 (c+d x))+5 b^3 \cos (7 (c+d x))+1225 a^3 \sin (c+d x)+525 a b^2 \sin (c+d x)+245 a^3 \sin (3 (c+d x))-35 a b^2 \sin (3 (c+d x))+49 a^3 \sin (5 (c+d x))-63 a b^2 \sin (5 (c+d x))+5 a^3 \sin (7 (c+d x))-15 a b^2 \sin (7 (c+d x))}{2240 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 145, normalized size = 1.02
method | result | size |
derivativedivides | \(\frac {b^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )+3 b^{2} a \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {3 a^{2} b \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{3} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(145\) |
default | \(\frac {b^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )+3 b^{2} a \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {3 a^{2} b \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{3} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(145\) |
risch | \(-\frac {15 b \cos \left (d x +c \right ) a^{2}}{64 d}-\frac {3 b^{3} \cos \left (d x +c \right )}{64 d}+\frac {35 a^{3} \sin \left (d x +c \right )}{64 d}+\frac {15 a \,b^{2} \sin \left (d x +c \right )}{64 d}-\frac {3 b \cos \left (7 d x +7 c \right ) a^{2}}{448 d}+\frac {b^{3} \cos \left (7 d x +7 c \right )}{448 d}+\frac {a^{3} \sin \left (7 d x +7 c \right )}{448 d}-\frac {3 a \sin \left (7 d x +7 c \right ) b^{2}}{448 d}-\frac {3 b \cos \left (5 d x +5 c \right ) a^{2}}{64 d}+\frac {b^{3} \cos \left (5 d x +5 c \right )}{320 d}+\frac {7 a^{3} \sin \left (5 d x +5 c \right )}{320 d}-\frac {9 a \sin \left (5 d x +5 c \right ) b^{2}}{320 d}-\frac {9 b \cos \left (3 d x +3 c \right ) a^{2}}{64 d}-\frac {b^{3} \cos \left (3 d x +3 c \right )}{64 d}+\frac {7 a^{3} \sin \left (3 d x +3 c \right )}{64 d}-\frac {a \sin \left (3 d x +3 c \right ) b^{2}}{64 d}\) | \(270\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 126, normalized size = 0.89 \begin {gather*} -\frac {15 \, a^{2} b \cos \left (d x + c\right )^{7} + {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{3} - {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a b^{2} - {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} b^{3}}{35 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 123, normalized size = 0.87 \begin {gather*} -\frac {7 \, b^{3} \cos \left (d x + c\right )^{5} + 5 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{7} - {\left (5 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \, {\left (2 \, a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{4} + 16 \, a^{3} + 8 \, a b^{2} + 4 \, {\left (2 \, a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{35 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 101962 vs.
\(2 (136) = 272\).
time = 82.30, size = 101962, normalized size = 718.04 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.94, size = 214, normalized size = 1.51 \begin {gather*} \frac {16\,a^3\,\sin \left (c+d\,x\right )}{35\,d}-\frac {b^3\,{\cos \left (c+d\,x\right )}^5}{5\,d}+\frac {b^3\,{\cos \left (c+d\,x\right )}^7}{7\,d}-\frac {3\,a^2\,b\,{\cos \left (c+d\,x\right )}^7}{7\,d}+\frac {8\,a^3\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{35\,d}+\frac {6\,a^3\,{\cos \left (c+d\,x\right )}^4\,\sin \left (c+d\,x\right )}{35\,d}+\frac {a^3\,{\cos \left (c+d\,x\right )}^6\,\sin \left (c+d\,x\right )}{7\,d}+\frac {8\,a\,b^2\,\sin \left (c+d\,x\right )}{35\,d}+\frac {4\,a\,b^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{35\,d}+\frac {3\,a\,b^2\,{\cos \left (c+d\,x\right )}^4\,\sin \left (c+d\,x\right )}{35\,d}-\frac {3\,a\,b^2\,{\cos \left (c+d\,x\right )}^6\,\sin \left (c+d\,x\right )}{7\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________